.text
.globl in_byte
.type in_byte, @function
in_byte:
    movl 4(%esp), %edx
    xorl %eax, %eax
    inb %dx, %al
    ret

.globl in_word
.type in_word, @function
in_word:
    movl 4(%esp), %edx
    xorl %eax, %eax
    inw %dx, %ax
    ret

.globl out_byte
.type out_byte, @function
out_byte:
    movl 4(%esp), %edx
    movl 8(%esp), %eax
    outb %al, %dx
    ret

.globl out_word
.type out_word, @function
out_word:
    movl 4(%esp), %edx
    movl 8(%esp), %eax
    outw %ax, %dx
    ret